package com.grandtech.insurance.common.utils.trans;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

public final class JsonUtil {

    private static Gson gson;

    private JsonUtil() {

    }


    public static String object2Json(Object obj) {
        if (gson == null) {
            gson = new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss").create();
        }
        String value = gson.toJson(obj);
        return value;
    }
}
